<template>
  <view class="container">
	  <image :src="vipImg" mode="aspectFit"></image>
  </view>
</template>

<script>
  import { setCartTabBadge } from '@/utils/app'
  import * as Api from '@/api/page'

  const App = getApp()

  export default {
    components: {
    },
    data() {
      return {
        // 页面参数
        options: {},
        // 页面属性
        page: {},
        // 页面元素
        items: [],
		vipImg:'',
      }
    },

    /**
     * 生命周期函数--监听页面加载
     */
    onLoad(options) {
      // 当前页面参数
      this.options = options
      // 加载页面数据
	  this.getSetting()
    },

    /**
     * 生命周期函数--监听页面显示
     */
    onShow() {
      // 更新购物车角标
      setCartTabBadge()
    },

    methods: {
		getSetting(){
			this.myhttp({
				url:'?s=/api/User/getSetting',
			}).then(res=>{
				console.log(res);
				if(res.data.code ==1){
					this.vipImg = res.data.data.logoImage.preview_url
					console.log(this.vipImg);
				}
			})
		}


    },

    /**
     * 下拉刷新
     */
    onPullDownRefresh() {
      // 获取首页数据
      this.getPageData(() => {
        uni.stopPullDownRefresh()
      })
    },

    /**
     * 分享当前页面
     */
    onShareAppMessage() {
      const app = this
      const { page } = app
      return {
        title: page.params.share_title,
        path: "/pages/index/index?" + app.$getShareUrlParams()
      }
    },

    /**
     * 分享到朋友圈
     * 本接口为 Beta 版本，暂只在 Android 平台支持，详见分享到朋友圈 (Beta)
     * https://developers.weixin.qq.com/miniprogram/dev/framework/open-ability/share-timeline.html
     */
    onShareTimeline() {
      const app = this
      const { page } = app
      return {
        title: page.params.share_title,
        path: "/pages/index/index?" + app.$getShareUrlParams()
      }
    }

  }
</script>

<style lang="scss" scoped>
  .container {
    background: #fff;
	width: 100%;
	height: 100vh;
	display: grid;
	place-items: center;
	image{
		// width: 100%;
		height: 100%;
	}
  }
</style>
